package com.rp.system.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author vicente
 * @since 2021-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TypeLibrary对象", description="")
public class TypeLibrary extends Model<TypeLibrary> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "父部门ID")
    private String parentId;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "名称拼接")
    private String tlName;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "备注")
    private String memo;

    @TableLogic
    @ApiModelProperty(value = "删除状态（0，正常，1已删除）")
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "编码")
    private String tlCode;

    @ApiModelProperty(value = "部门编码")
    @TableField(fill = FieldFill.INSERT)
    private String orgCode;

    @ApiModelProperty(value = "拓展(自定义字段 json格式)")
    private String expand;

    @ApiModelProperty(value = "备用1")
    private String spare1;

    @ApiModelProperty(value = "备用2")
    private String spare2;

    @ApiModelProperty(value = "备用3")
    private String spare3;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
